package com.qf.smartplatform.websocket;

import com.qf.smartplatform.event.DeviceColorEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/*** @author Tgb
 * @version V1.0
 * @Project smartplatform
 * @Package com.qf.smartplatform.websocket
 * @Description:
 * @Date 2022/9/14 19:38
 */
@Component
public class DeviceColorWebSocketHandler extends MyBaseWebScoketHandler {

    @EventListener
    public void onCommand(DeviceColorEvent event){
        sendControl(event.getDeviceId(),event.getCommand());
    }

    @Override
    public boolean isUpdateStatus() {
        return true;
    }
}
